﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="quan-ly-phu-hop.aspx.cs" Inherits="Admin_quan_ly_phu_hop" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>Quản lý phù hợp</h1>
    <asp:GridView ID="grvAppropriate" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="PhuHopID" 
        onrowcancelingedit="grvAppropriate_RowCancelingEdit" 
        onrowdeleting="grvAppropriate_RowDeleting" 
        onrowediting="grvAppropriate_RowEditing" 
        onrowupdating="grvAppropriate_RowUpdating">
        <Columns>
            <asp:BoundField DataField="MoTa" HeaderText="Mô Tả" />
            <asp:TemplateField HeaderText="Hình Ảnh">
                <ItemTemplate><img runat="server" alt="" src='<%#"~/" +Eval("HinhDaiDien") %>' /></ItemTemplate>
                <EditItemTemplate>
                    <asp:FileUpload ID="fuAvatar" runat="server" /></EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ButtonType="Button" ShowEditButton="True" HeaderText="Sửa" />
            <asp:CommandField ButtonType="Button" HeaderText="Xóa" 
                ShowDeleteButton="True" />
        </Columns>
    </asp:GridView><br />
    <h1>Thêm Mới Phù Hợp</h1>
    <span>Nhập mô tả</span><asp:TextBox ID="txtAppropriateDes" runat="server"></asp:TextBox><asp:FileUpload
        ID="fuAvatar" runat="server" /><asp:Button
        ID="btnOK" runat="server" Text="Thêm Mới" onclick="btnOK_Click" />
        <h1>Quản lý Nhà hàng Phù Hợp</h1>
        <span>Chọn Nhà Hàng</span><asp:DropDownList ID="ddlRes" runat="server" 
        AutoPostBack="true" onselectedindexchanged="ddlRes_SelectedIndexChanged">
        </asp:DropDownList>
    <asp:GridView ID="grvResAppropriate" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="NhaHang_PhuHopID" 
        onrowcancelingedit="grvResAppropriate_RowCancelingEdit" 
        onrowdatabound="grvResAppropriate_RowDataBound" 
        onrowdeleting="grvResAppropriate_RowDeleting" 
        onrowediting="grvResAppropriate_RowEditing" 
        onrowupdating="grvResAppropriate_RowUpdating">
        <Columns>
            <asp:BoundField DataField="TenNhaHang" HeaderText="Nhà Hàng" />
            <asp:TemplateField HeaderText="Phù Hợp">
                <ItemTemplate>
                    <asp:Label ID="lblAppropriateDescrip" runat="server" Text='<%#Eval("MoTa") %>'></asp:Label></ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlAppropriate" runat="server">
                        </asp:DropDownList>
                    </EditItemTemplate>
            </asp:TemplateField>
            <asp:CheckBoxField DataField="IsDefault" HeaderText="IsDefault" />
            <asp:CommandField ButtonType="Button" HeaderText="Sửa" ShowEditButton="True" />
            <asp:CommandField ButtonType="Button" HeaderText="Xóa" 
                ShowDeleteButton="True" />
        </Columns>
    </asp:GridView><br />
    <h1>Thêm Nhà Hàng Phù Hợp</h1>
    <span>Chọn Phù Hợp: </span>
    <asp:DropDownList ID="ddlAppropriate" runat="server" AutoPostBack="true">
    </asp:DropDownList>
    <asp:Button ID="btnAdd" runat="server" Text="Thêm" onclick="btnAdd_Click" />
    <asp:CheckBox
        ID="cbIsDefault" runat="server" Text="Mặc định" />
</asp:Content>

